package com.cloud.feign.service;

import com.joyoung.common.controller.RestRes;
import com.cloud.feign.resp.KeyAccessoryData;
import com.cloud.feign.resp.KeyAccessoryInfo;
import com.cloud.feign.resp.ManufacturingProcessInfo;
import com.cloud.feign.resp.ProductBasicInfo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

//@FeignClient(value = "mes-report", url = "localhost:8759")
@FeignClient(value = "mes-report")
public interface MesReportFeign {

    /**
     * 通过物料编码查询产品溯源-基础信息
     *
     * @param barcode 产品码
     * @return GoodsDetailVo
     */
    @GetMapping("/accessoryTraceability/getProductBasicInfo")
    RestRes<ProductBasicInfo> getProductBasicInfo(@RequestParam("barcode") String barcode);

    /**
     * 通过物料编码查询产品溯源-配件相关信息
     *
     * @param barcode 产品码
     * @return GoodsDetailVo
     */
    @GetMapping("/accessoryTraceability/getKeyAccessoryInfo")
    RestRes<KeyAccessoryInfo> getKeyAccessoryInfo(@RequestParam("barcode") String barcode);

    /**
     * 通过物料编码查询产品溯源-制造相关信息
     *
     * @param barcode 产品码
     * @return GoodsDetailVo
     */
    @GetMapping("/accessoryTraceability/getManufacturingProcess")
    RestRes<ManufacturingProcessInfo> getManufacturingProcess(@RequestParam("barcode") String barcode);

    /**
     * 通过物料编码查询配件溯源-相关信息
     *
     * @param snCode 配件SN码
     * @return GoodsDetailVo
     */
    @GetMapping("/accessoryTraceability/getKeyAccessory")
    RestRes<KeyAccessoryData> getKeyAccessory(@RequestParam("snCode") String snCode);
}
